package com.t.bricks.bussiness.db.entity.ordersstatis.base;

import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;

import java.io.Serializable;
import java.math.BigDecimal;
import java.util.Date;

import org.springframework.format.annotation.DateTimeFormat;

import com.t.bricks.annotation.DataInfo;

/**
 * 订单统计'OrdersStatis'表实体类
 * 警告:非数据库字段禁止在此添加,应该创建扩展实体中添加
 * @author HuangXinBian
 */
@ApiModel("订单统计OrdersStatis")
@DataInfo(sDbName="BricksMall", sTableName="OrdersStatis")
public class OrdersStatisBase implements Serializable {

	private static final long serialVersionUID = 1L;// 使用rmi时需修改

	/**
	 * 记录编号
	 */
	//[start]
	@DataInfo( sDbName="BricksMall", sTableName="OrdersStatis",
		sName="sId", sComment="记录编号", isDbField=true, sDbFileType="varchar",
		sDefaultData="", isExtra=false, iskey=true, isNull=false,
		iMaxLength=32, isDecimal=false, iIntegralLength=2, iDecimalLength=2, iIndex=0 )
	@ApiModelProperty(value="记录编号", example="", position=0)
	//[end]
	protected String sId;

	/**
	 * 年
	 */
	//[start]
	@DataInfo( sDbName="BricksMall", sTableName="OrdersStatis",
		sName="iYear", sComment="年", isDbField=true, sDbFileType="int",
		sDefaultData="", isExtra=false, iskey=false, isNull=false,
		iMaxLength=100, isDecimal=false, iIntegralLength=2, iDecimalLength=2, iIndex=1 )
	@ApiModelProperty(value="年", example="", position=1)
	//[end]
	protected Integer iYear;

	/**
	 * 月
	 */
	//[start]
	@DataInfo( sDbName="BricksMall", sTableName="OrdersStatis",
		sName="iMonth", sComment="月", isDbField=true, sDbFileType="int",
		sDefaultData="", isExtra=false, iskey=false, isNull=false,
		iMaxLength=100, isDecimal=false, iIntegralLength=2, iDecimalLength=2, iIndex=2 )
	@ApiModelProperty(value="月", example="", position=2)
	//[end]
	protected Integer iMonth;

	/**
	 * 日
	 */
	//[start]
	@DataInfo( sDbName="BricksMall", sTableName="OrdersStatis",
		sName="iDay", sComment="日", isDbField=true, sDbFileType="int",
		sDefaultData="", isExtra=false, iskey=false, isNull=true,
		iMaxLength=100, isDecimal=false, iIntegralLength=2, iDecimalLength=2, iIndex=3 )
	@ApiModelProperty(value="日", example="", position=3)
	//[end]
	protected Integer iDay;

	/**
	 * 统计时间
	 */
	@DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")//解决表单提交时字符串时间值错误
	//[start]
	@DataInfo( sDbName="BricksMall", sTableName="OrdersStatis",
		sName="dTime", sComment="统计时间", isDbField=true, sDbFileType="datetime",
		sDefaultData="", isExtra=false, iskey=false, isNull=false,
		iMaxLength=23, isDecimal=false, iIntegralLength=-1, iDecimalLength=-1, iIndex=4 )
	@ApiModelProperty(value="统计时间", example="", position=4)
	//[end]
	protected Date dTime;

	/**
	 * 粒度(枚举,1:日;2:月;3:年)
	 */
	//[start]
	@DataInfo( sDbName="BricksMall", sTableName="OrdersStatis",
		sName="iGrain", sComment="粒度(枚举,1:日;2:月;3:年)", isDbField=true, sDbFileType="int",
		sDefaultData="1", isExtra=false, iskey=false, isNull=false,
		iMaxLength=100, isDecimal=false, iIntegralLength=2, iDecimalLength=2, iIndex=5 )
	@ApiModelProperty(value="粒度(枚举,1:日;2:月;3:年)", example="1", position=5)
	//[end]
	protected Integer iGrain;
	
	/**
	 * 总金额
	 */
	//[start]
	@DataInfo( sDbName="BricksMall", sTableName="OrdersStatis",
		sName="mMoney", sComment="总金额", isDbField=true, sDbFileType="decimal",
		sDefaultData="0.00", isExtra=false, iskey=false, isNull=false,
		iMaxLength=20, isDecimal=false, iIntegralLength=16, iDecimalLength=2, iIndex=6 )
	@ApiModelProperty(value="总金额", example="0.00", position=6)
	//[end]
	protected BigDecimal mMoney;
	
	/**
	 * 支付金额
	 */
	//[start]
	@DataInfo( sDbName="BricksMall", sTableName="OrdersStatis",
		sName="mMoneyPay", sComment="支付金额", isDbField=true, sDbFileType="decimal",
		sDefaultData="0.00", isExtra=false, iskey=false, isNull=false,
		iMaxLength=20, isDecimal=false, iIntegralLength=16, iDecimalLength=2, iIndex=7 )
	@ApiModelProperty(value="支付金额", example="0.00", position=7)
	//[end]
	protected BigDecimal mMoneyPay;
	
	/**
	 * 支付优惠卷
	 */
	//[start]
	@DataInfo( sDbName="BricksMall", sTableName="OrdersStatis",
		sName="mCouponPay", sComment="支付优惠卷", isDbField=true, sDbFileType="decimal",
		sDefaultData="0.00", isExtra=false, iskey=false, isNull=false,
		iMaxLength=20, isDecimal=false, iIntegralLength=16, iDecimalLength=2, iIndex=8 )
	@ApiModelProperty(value="支付优惠卷", example="0.00", position=8)
	//[end]
	protected BigDecimal mCouponPay;

	/**
	 * 支付积分
	 */
	//[start]
	@DataInfo( sDbName="BricksMall", sTableName="OrdersStatis",
		sName="iTallyPay", sComment="支付积分", isDbField=true, sDbFileType="bigint",
		sDefaultData="0", isExtra=false, iskey=false, isNull=false,
		iMaxLength=100, isDecimal=false, iIntegralLength=2, iDecimalLength=2, iIndex=9 )
	@ApiModelProperty(value="支付积分", example="0", position=9)
	//[end]
	protected Long iTallyPay;

	/**
	 * 赠送积分
	 */
	//[start]
	@DataInfo( sDbName="BricksMall", sTableName="OrdersStatis",
		sName="iTallyLargess", sComment="赠送积分", isDbField=true, sDbFileType="bigint",
		sDefaultData="0", isExtra=false, iskey=false, isNull=false,
		iMaxLength=100, isDecimal=false, iIntegralLength=2, iDecimalLength=2, iIndex=10 )
	@ApiModelProperty(value="赠送积分", example="0", position=10)
	//[end]
	protected Long iTallyLargess;
	
	/**
	 * 运费
	 */
	//[start]
	@DataInfo( sDbName="BricksMall", sTableName="OrdersStatis",
		sName="mFreight", sComment="运费", isDbField=true, sDbFileType="decimal",
		sDefaultData="0.00", isExtra=false, iskey=false, isNull=false,
		iMaxLength=20, isDecimal=false, iIntegralLength=16, iDecimalLength=2, iIndex=11 )
	@ApiModelProperty(value="运费", example="0.00", position=11)
	//[end]
	protected BigDecimal mFreight;

	/**
	 * 状态(1:下单;2:已支付;3:已出库;4:已送达;5:已签收;6:已确认;7:退货申请;8:退货审核不通过;9:退货申请通过;10:已退款;11:已审计;90:已完结)
	 */
	//[start]
	@DataInfo( sDbName="BricksMall", sTableName="OrdersStatis",
		sName="iState", sComment="状态(1:下单;2:已支付;3:已出库;4:已送达;5:已签收;6:已确认;7:退货申请;8:退货审核不通过;9:退货申请通过;10:已退款;11:已审计;90:已完结)", isDbField=true, sDbFileType="int",
		sDefaultData="1", isExtra=false, iskey=false, isNull=false,
		iMaxLength=100, isDecimal=false, iIntegralLength=2, iDecimalLength=2, iIndex=12 )
	@ApiModelProperty(value="状态(1:下单;2:已支付;3:已出库;4:已送达;5:已签收;6:已确认;7:退货申请;8:退货审核不通过;9:退货申请通过;10:已退款;11:已审计;90:已完结)", example="1", position=12)
	//[end]
	protected Integer iState;

	/**
	 * 取 记录编号
	 * @return String
	 */
	public String getsId() {
		return sId;
	}

	/**
	 * 设置记录编号
	 * @param sId
	 */
	public void setsId(String sId) {
		this.sId = sId;
	}

	/**
	 * 取 年
	 * @return Integer
	 */
	public Integer getiYear() {
		return iYear;
	}

	/**
	 * 设置年
	 * @param iYear
	 */
	public void setiYear(Integer iYear) {
		this.iYear = iYear;
	}

	/**
	 * 取 月
	 * @return Integer
	 */
	public Integer getiMonth() {
		return iMonth;
	}

	/**
	 * 设置月
	 * @param iMonth
	 */
	public void setiMonth(Integer iMonth) {
		this.iMonth = iMonth;
	}

	/**
	 * 取 日
	 * @return Integer
	 */
	public Integer getiDay() {
		return iDay;
	}

	/**
	 * 设置日
	 * @param iDay
	 */
	public void setiDay(Integer iDay) {
		this.iDay = iDay;
	}

	/**
	 * 取 统计时间
	 * @return Date
	 */
	public Date getdTime() {
		return dTime;
	}

	/**
	 * 设置统计时间
	 * @param dTime
	 */
	public void setdTime(Date dTime) {
		this.dTime = dTime;
	}

	/**
	 * 取 粒度(枚举,1:日;2:月;3:年)
	 * @return Integer
	 */
	public Integer getiGrain() {
		return iGrain;
	}

	/**
	 * 设置粒度(枚举,1:日;2:月;3:年)
	 * @param iGrain
	 */
	public void setiGrain(Integer iGrain) {
		this.iGrain = iGrain;
	}

	/**
	 * 取 总金额
	 * @return Long
	 */
	public BigDecimal getmMoney() {
		return mMoney;
	}

	/**
	 * 设置 总金额
	 * @param mMoney
	 */
	public void setmMoney(BigDecimal mMoney) {
		this.mMoney = mMoney;
	}

	/**
	 * 取 支付金额
	 * @return Long
	 */
	public BigDecimal getmMoneyPay() {
		return mMoneyPay;
	}

	/**
	 * 设置 支付金额
	 * @param mMoneyPay
	 */
	public void setmMoneyPay(BigDecimal mMoneyPay) {
		this.mMoneyPay = mMoneyPay;
	}

	/**
	 * 取 支付优惠卷
	 * @return Long
	 */
	public BigDecimal getmCouponPay() {
		return mCouponPay;
	}

	/**
	 * 设置 支付优惠卷
	 * @param mCouponPay
	 */
	public void setmCouponPay(BigDecimal mCouponPay) {
		this.mCouponPay = mCouponPay;
	}

	/**
	 * 取 支付积分
	 * @return Long
	 */
	public Long getiTallyPay() {
		return iTallyPay;
	}

	/**
	 * 设置 支付积分
	 * @param iTallyPay
	 */
	public void setiTallyPay(Long iTallyPay) {
		this.iTallyPay = iTallyPay;
	}

	/**
	 * 取 赠送积分
	 * @return Long
	 */
	public Long getiTallyLargess() {
		return iTallyLargess;
	}

	/**
	 * 设置 赠送积分
	 * @param iTallyLargess
	 */
	public void setiTallyLargess(Long iTallyLargess) {
		this.iTallyLargess = iTallyLargess;
	}

	/**
	 * 取 运费
	 * @return Long
	 */
	public BigDecimal getmFreight() {
		return mFreight;
	}

	/**
	 * 设置 运费
	 * @param mFreight
	 */
	public void setmFreight(BigDecimal mFreight) {
		this.mFreight = mFreight;
	}

	/**
	 * 取 状态(1:下单;2:已支付;3:已出库;4:已送达;5:已签收;6:已确认;7:退货申请;8:退货审核不通过;9:退货申请通过;10:已退款;11:已审计;90:已完结)
	 * @return Integer
	 */
	public Integer getiState() {
		return iState;
	}

	/**
	 * 设置状态(1:下单;2:已支付;3:已出库;4:已送达;5:已签收;6:已确认;7:退货申请;8:退货审核不通过;9:退货申请通过;10:已退款;11:已审计;90:已完结)
	 * @param iState
	 */
	public void setiState(Integer iState) {
		this.iState = iState;
	}

	/**
	 * 复制对象
	 * @param source 数据源
	 * @return OrdersStatisBase
	 */
	public static OrdersStatisBase copy(OrdersStatisBase source) {
		if (null == source) {
			return null;
		}
		
		OrdersStatisBase target = new OrdersStatisBase();
		target.setsId(source.getsId());
		target.setiYear(source.getiYear());
		target.setiMonth(source.getiMonth());
		target.setiDay(source.getiDay());
		target.setdTime(source.getdTime());
		target.setiGrain(source.getiGrain());
		target.setmMoney(source.getmMoney());
		target.setmMoneyPay(source.getmMoneyPay());
		target.setmCouponPay(source.getmCouponPay());
		target.setiTallyPay(source.getiTallyPay());
		target.setiTallyLargess(source.getiTallyLargess());
		target.setmFreight(source.getmFreight());
		target.setiState(source.getiState());

		return target;
	}
	
	/**
	 * 克隆对象
	 * @return OrdersStatisBase
	 */
	public OrdersStatisBase clone() {
		return copy(this);
	}
	
}
